import { jwtConstants } from '@app/common/constants';
import { DatabaseModule } from '@app/database';
import { accountProviders } from '@app/database/providers/account.providers';
import { reservationProviders } from '@app/database/providers/reservation.providers';
import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { AccountService } from './account/account.service';
import { ReservationService } from './reservation/reservation.service';

@Module({
  imports: [
    DatabaseModule,
    JwtModule.register({
      global: true,
      secret: jwtConstants.secret,
      signOptions: { expiresIn: 60 },
    }),
  ],
  providers: [
    ...reservationProviders,
    ...accountProviders,
    ReservationService,
    AccountService,
  ],
  exports: [ReservationService, AccountService],
})
export class ServicesModule {}
